<?php
namespace app\index\controller;

use app\common\exception\JsonException;
use app\common\enums\ErrorCode;
use app\common\vo\ResultVo;

class IndexController
{
    public function index()
    {
        return 'This is the backend api';
    }

    /**
     * @param string        $name 数据名称
     * @route('hello/:name','get')
     * 	->pattern(['name' => '\w+'])
     *
     * @return mixed
     */
    public function hello($name = 'ThinkPHP5')
    {
        $name1 = $name;
        return 'hello,' . $name;
    }
}
